package com.xli.module.framemodule.entity.dto;

import com.xli.dto.search.SearchDTO;
import com.xli.dto.search.type.QueryType;
import com.xli.dto.validation.group.IGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;


@Data
@EqualsAndHashCode(callSuper = true)
public class ModuleSearchDTO extends SearchDTO {

    @Serial
    private static final long serialVersionUID = 797488586151433888L;

    @Schema(description = "模块名称")
    @QueryType(value = QueryType.Type.LIKE, field = "name")
    private String name;

    @Schema(description = "上级模块")
    @QueryType(value = QueryType.Type.EQ, field = "pid")
    @NotBlank(message = "pid必填", groups = {IGroup.search.class})
    private String pid;

    @Schema(description = "模块类型")
    @QueryType(value = QueryType.Type.EQ, field = "type")
    private String type;
}
